import request from '@/utils/request'
import { param } from '@/utils'

// 查询帖子列表
export function listCircle(query) {
  return request({
    url: '/debao/circle/list',
    method: 'get',
    params: query
  })
}

// 查询帖子详细
export function getCircle(id) {
  return request({
    url: '/debao/circle/' + id,
    method: 'get'
  })
}

// 新增帖子
export function addCircle(data) {
  return request({
    url: '/debao/circle',
    method: 'post',
    data: data
  })
}

// 修改帖子
export function updateCircle(data) {
  return request({
    url: '/debao/circle',
    method: 'put',
    data: data
  })
}

// 删除帖子
export function delCircle(id) {
  return request({
    url: '/debao/circle/' + id,
    method: 'delete'
  })
}

/**
 * 审核
 * @param param
 * @returns {*}
 */
export function examine(id,status) {
  return request({
    url: '/debao/circle/audit/' + id + '/' + status,
    method: 'post'
  })
}

